package com.zufe.Test6;

public class Test {
    public static void main(String[] args) {
        Person p = new Person("张三", 20);
        Cat cat = new Cat(2, "白");
        Dog dog = new Dog(3, "黑");
        System.out.println(cat.getAge() + "的" + cat.getColor() + "猫");
        System.out.println(dog.getAge() + "的" + dog.getColor() + "狗");
        cat.catchMouse();
        dog.lookHome();

        p.keepPet(cat, "鱼");
        p.keepPet(dog, "骨头");

    }
}
